package service

import (
	"github.com/google/wire"
	"organoid_public/domain/sample/model"
	"organoid_public/domain/sample/repository"
	"organoid_public/infrastructure/db/gormclient"
)

var SampleServiceProvider = wire.NewSet(NewSampleService, NewProtocolService, NewBrowseService, NewUserService)

type SearchServiceInterface interface {
	OrganoidList(params *repository.OrganoidListParams) (*gormclient.PageList[model.SearchProtocalOrganoid], error)
	CoCultureList(params *repository.OrganoidListParams) (*gormclient.PageList[model.SearchProtocalCoculture], error)
	IdentifyList(params *repository.BiomarkerListParams) (*gormclient.PageList[model.SearchBiomarkerIdentified], error)
	PotentialList(params *repository.BiomarkerListParams) (*gormclient.PageList[model.SearchBiomarkerPotential], error)
}

type ProtocolServiceInterface interface {
	ProtocolDetail(sampleId string) ([]model.SampleProtocolProcess, []model.SampleProtocolMedium, []model.SampleProtocolKeyNode, []model.SampleProtocolMaterial, error)
}

type BrowseServiceInterface interface {
	GeneralList(params *repository.GeneralListParams) (*gormclient.PageList[model.BrowseGeneral], error)
}

type UserServiceInterface interface {
	LoginIn(username, password string) (string, error)
	HeadImgUpload(params *repository.HeadImgParams) error
	CheckAuth(token string) (*JwtTokenObj, error)
	LoginOut(token string) (bool, error)
}
